try:

    str=input()
    word_list = str.split(' ')

    print(len(word_list[-1]))

except IndexError:
    print("Invalid words input.")